from rest_framework.viewsets import ModelViewSet

from meiduo_admin.serializers.option_serializer import *
from meiduo_admin.pages import Mypage
from goods.models import SpecificationOption, SPUSpecification


class OptionView(ModelViewSet):
    queryset = SpecificationOption.objects.all()
    serializer_class = OptionSerializer
    pagination_class = Mypage

class OptionSimpleView(ListAPIView):
    queryset = SPUSpecification.objects.all()
    serializer_class = OptionSimpleSerializer

